

UPDATE FLW_PAL_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.68.131 (192.168.68.131)', LOCKGRANTED = GETDATE() WHERE ID = 1 AND LOCKED = 0

ALTER TABLE FLW_PALETTE_DEFINITION ADD CATEGORY_ nvarchar(255)

update FLW_PALETTE_DEFINITION set CATEGORY_ = 'engage'

INSERT INTO FLW_PAL_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('2', 'flowable', 'com/flowable/palette/db/liquibase/flowable-palette-db-changelog.xml', GETDATE(), 2, '8:61c00e9fea89f7e5f08ba423b5d976fe', 'addColumn tableName=FLW_PALETTE_DEFINITION; sql', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377749129')

UPDATE FLW_PAL_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1



UPDATE FLW_LIC_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.68.131 (192.168.68.131)', LOCKGRANTED = GETDATE() WHERE ID = 1 AND LOCKED = 0

UPDATE FLW_LIC_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1



UPDATE ACT_DE_DATABASECHANGELOGLOCK SET LOCKED = 1, LOCKEDBY = '192.168.68.131 (192.168.68.131)', LOCKGRANTED = GETDATE() WHERE ID = 1 AND LOCKED = 0

exec sp_rename 'FLW_DE_TENANT.TENANT_ID_', 'ID_'

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('50', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 17, '8:0ee9a5803d76cc7f10b86086982b70b0', 'renameColumn newColumnName=ID_, oldColumnName=TENANT_ID_, tableName=FLW_DE_TENANT', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

DROP TABLE ACT_DE_MODEL_METADATA

ALTER TABLE FLW_DE_TENANT ADD REV_ int CONSTRAINT DF_FLW_DE_TENANT_REV_ DEFAULT 1 NOT NULL

ALTER TABLE FLW_DE_TENANT ADD NAME_ nvarchar(255)

ALTER TABLE FLW_DE_TENANT ADD DESCRIPTION_ nvarchar(4000)

ALTER TABLE FLW_DE_TENANT ADD CREATED_AT_ datetime2(6)

CREATE TABLE FLW_DE_WORKSPACE (ID_ varchar(255) NOT NULL, REV_ int NOT NULL, KEY_ varchar(255) NOT NULL, TENANT_ID_ varchar(255) NOT NULL, NAME_ nvarchar(255), DESCRIPTION_ nvarchar(4000), VISIBILITY_ varchar(15) CONSTRAINT DF_FLW_DE_WORKSPACE_VISIBILITY_ DEFAULT 'private' NOT NULL, CREATED_AT_ datetime2(6) NOT NULL, CONSTRAINT PK_FLW_DE_WORKSPACE PRIMARY KEY (ID_), CONSTRAINT FK_FLW_DE_WORKSPACE_TENANT FOREIGN KEY (TENANT_ID_) REFERENCES dbo.FLW_DE_TENANT(ID_))

ALTER TABLE FLW_DE_WORKSPACE ADD CONSTRAINT UQ_FLW_DE_WORKSPACE_KEY_TENANT UNIQUE (KEY_, TENANT_ID_)

CREATE TABLE FLW_DE_IDENTITY_LINK (ID_ varchar(64) NOT NULL, USER_ID_ varchar(255), GROUP_ID_ varchar(255), TYPE_ varchar(255), SCOPE_ID_ varchar(255), SCOPE_TYPE_ varchar(255), CONSTRAINT PK_FLW_DE_IDENTITY_LINK PRIMARY KEY (ID_))

CREATE NONCLUSTERED INDEX IDX_FLW_DE_IDENT_LINK_USER ON FLW_DE_IDENTITY_LINK(USER_ID_)

CREATE NONCLUSTERED INDEX IDX_FLW_DE_IDENT_LINK_GROUP ON FLW_DE_IDENTITY_LINK(GROUP_ID_)

CREATE NONCLUSTERED INDEX IDX_FLW_DE_IDENT_LINK_SCOPE ON FLW_DE_IDENTITY_LINK(SCOPE_TYPE_, SCOPE_ID_)

ALTER TABLE ACT_DE_MODEL ADD visibility_ varchar(15) CONSTRAINT DF_ACT_DE_MODEL_visibility_ DEFAULT 'internal' NOT NULL

exec sp_rename 'ACT_DE_MODEL.tenant_id', 'workspace_id_'

exec sp_rename 'ACT_DE_MODEL_HISTORY.tenant_id', 'workspace_id_'

exec sp_rename 'ACT_DE_MODEL_RELATION.tenant_id', 'workspace_id_'

UPDATE ACT_DE_MODEL SET visibility_ = 'public' WHERE model_type = 3

ALTER TABLE ACT_DE_USER ADD REV_ int CONSTRAINT DF_ACT_DE_USER_REV_ DEFAULT 1 NOT NULL

CREATE TABLE FLW_DE_PRIVILEGE_MAPPING (ID_ nvarchar(64) NOT NULL, PRIVILEGE_ nvarchar(64) NOT NULL, USER_ID_ nvarchar(255), GROUP_ID_ nvarchar(255), CONSTRAINT PK_FLW_DE_PRIVILEGE_MAPPING PRIMARY KEY (ID_))

CREATE NONCLUSTERED INDEX FLW_DE_IDX_PRIVILEGE_USER ON FLW_DE_PRIVILEGE_MAPPING(USER_ID_)

CREATE NONCLUSTERED INDEX FLW_DE_IDX_PRIV_GROUP ON FLW_DE_PRIVILEGE_MAPPING(GROUP_ID_)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('51', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 18, '8:44f93094925401173cd7451ea50b75d8', 'dropTable tableName=ACT_DE_MODEL_METADATA; addColumn tableName=FLW_DE_TENANT; createTable tableName=FLW_DE_WORKSPACE; addUniqueConstraint constraintName=UQ_FLW_DE_WORKSPACE_KEY_TENANT, tableName=FLW_DE_WORKSPACE; createTable tableName=FLW_DE_IDENT...', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

UPDATE ACT_DE_USER SET TENANT_ID_ = 'default'

INSERT INTO FLW_DE_PRIVILEGE_MAPPING(ID_, PRIVILEGE_, USER_ID_)
            SELECT
               CONVERT(varchar(64), newid()) as ID_,
               'admin' as PRIVILEGE_,
               u.USERNAME_ as USER_ID_
            FROM ACT_DE_USER u
            WHERE u.IS_ADMIN_ = 1

INSERT INTO FLW_DE_WORKSPACE(ID_, REV_, KEY_, TENANT_ID_, VISIBILITY_, NAME_, DESCRIPTION_, CREATED_AT_)
            SELECT
               CONVERT(varchar(64), newid()) as ID_,
               1 as REV_,
               tenants.TENANT_ID as KEY_,
               'default' as TENANT_ID_,
               'public' as VISIBILITY_,
               concat('Generated ', tenants.TENANT_ID) as NAME_,
               concat('Generated Workspace from modeling tenant ', tenants.TENANT_ID) as DESCRIPTION_,
               getdate() as CREATED_AT_
            FROM (
                SELECT DISTINCT workspace_id_ as TENANT_ID
                FROM ACT_DE_MODEL

                UNION

                SELECT ID_ as TENANT_ID
                FROM FLW_DE_TENANT
            ) tenants

DELETE FROM FLW_DE_TENANT WHERE ID_ <> 'default'

update ACT_DE_MODEL
            set created_by = (select u.USERNAME_ from ACT_DE_USER u where u.ID_ = created_by)
            where created_by in (select u.ID_ from ACT_DE_USER u)

update ACT_DE_MODEL
            set last_updated_by = (select USERNAME_ from ACT_DE_USER u where u.ID_ = last_updated_by)
            where last_updated_by in (select u.ID_ from ACT_DE_USER u)

update ACT_DE_MODEL
            set locked_by_ = (select USERNAME_ from ACT_DE_USER u where u.ID_ = locked_by_)
            where locked_by_ is not null
              and locked_by_ in (select u.ID_ from ACT_DE_USER u)

update ACT_DE_MODEL_HISTORY
            set created_by = (select USERNAME_ from ACT_DE_USER u where u.ID_ = created_by)
            where created_by in (select u.ID_ from ACT_DE_USER u)

update ACT_DE_MODEL_HISTORY
            set last_updated_by = (select USERNAME_ from ACT_DE_USER u where u.ID_ = last_updated_by)
            where last_updated_by in (select u.ID_ from ACT_DE_USER u)

update ACT_DE_MODEL
            set workspace_id_ = (select workspace.ID_ from FLW_DE_WORKSPACE workspace where workspace.KEY_ = workspace_id_)

update ACT_DE_MODEL_HISTORY
            set workspace_id_ = (select workspace.ID_ from FLW_DE_WORKSPACE workspace where workspace.KEY_ = workspace_id_)

update ACT_DE_MODEL_RELATION
            set workspace_id_ = (select workspace.ID_ from FLW_DE_WORKSPACE workspace where workspace.KEY_ = workspace_id_)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('52', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 19, '8:61ebbcd940d7d32b8420835c57958ada', 'update tableName=ACT_DE_USER; sql; sql; sql; delete tableName=FLW_DE_TENANT; sql; sql; sql; sql; sql; sql; sql; sql', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE ACT_DE_USER DROP CONSTRAINT FLW_DE_UNIQ_USERNAME

DECLARE @sql [nvarchar](MAX)
SELECT @sql = N'ALTER TABLE ACT_DE_USER DROP CONSTRAINT ' + QUOTENAME([kc].[name]) FROM [sys].[key_constraints] AS [kc] WHERE [kc].[parent_object_id] = OBJECT_ID(N'ACT_DE_USER') AND [kc].[type] = 'PK'
EXEC sp_executesql @sql


SELECT @sql = N'ALTER TABLE ACT_DE_USER DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[default_object_id] WHERE [c].[object_id] = OBJECT_ID(N'ACT_DE_USER') AND [c].[name] = N'ID_'
EXEC sp_executesql @sql

ALTER TABLE ACT_DE_USER DROP COLUMN ID_

exec sp_rename 'ACT_DE_USER.USERNAME_', 'ID_'

ALTER TABLE ACT_DE_USER ADD PRIMARY KEY (ID_)


SELECT @sql = N'ALTER TABLE ACT_DE_USER DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[default_object_id] WHERE [c].[object_id] = OBJECT_ID(N'ACT_DE_USER') AND [c].[name] = N'IS_ADMIN_'
EXEC sp_executesql @sql

ALTER TABLE ACT_DE_USER DROP COLUMN IS_ADMIN_


SELECT @sql = N'ALTER TABLE ACT_DE_USER DROP CONSTRAINT ' + QUOTENAME([df].[name]) FROM [sys].[columns] AS [c] INNER JOIN [sys].[default_constraints] AS [df] ON [df].[object_id] = [c].[default_object_id] WHERE [c].[object_id] = OBJECT_ID(N'ACT_DE_USER') AND [c].[name] = N'MODEL_RIGHTS_'
EXEC sp_executesql @sql

ALTER TABLE ACT_DE_USER DROP COLUMN MODEL_RIGHTS_

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('53', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 20, '8:6e6ad11f1576236e54d645b1b60ffa1f', 'dropUniqueConstraint constraintName=FLW_DE_UNIQ_USERNAME, tableName=ACT_DE_USER; dropPrimaryKey tableName=ACT_DE_USER; dropColumn columnName=ID_, tableName=ACT_DE_USER; renameColumn newColumnName=ID_, oldColumnName=USERNAME_, tableName=ACT_DE_USER...', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE ACT_DE_MODEL ADD palette_def_category_ nvarchar(64)

ALTER TABLE ACT_DE_MODEL ADD palette_def_key_ nvarchar(64)

ALTER TABLE ACT_DE_MODEL_HISTORY ADD palette_def_category_ nvarchar(64)

ALTER TABLE ACT_DE_MODEL_HISTORY ADD palette_def_key_ nvarchar(64)

update ACT_DE_MODEL set palette_def_category_ = 'engage'

update ACT_DE_MODEL_HISTORY set palette_def_category_ = 'engage'

update ACT_DE_MODEL set palette_def_key_ = 'flowable-engage-process-palette' where model_type = 0

update ACT_DE_MODEL_HISTORY set palette_def_key_ = 'flowable-engage-process-palette' where model_type = 0

update ACT_DE_MODEL set palette_def_key_ = 'flowable-engage-case-palette' where model_type = 5

update ACT_DE_MODEL_HISTORY set palette_def_key_ = 'flowable-engage-case-palette' where model_type = 5

update ACT_DE_MODEL set palette_def_key_ = 'flowable-engage-form-palette' where model_type = 2

update ACT_DE_MODEL_HISTORY set palette_def_key_ = 'flowable-engage-form-palette' where model_type = 2

update ACT_DE_MODEL set palette_def_key_ = 'flowable-engage-page-palette' where model_type = 9

update ACT_DE_MODEL_HISTORY set palette_def_key_ = 'flowable-engage-page-palette' where model_type = 9

update ACT_DE_MODEL set palette_def_key_ = 'flowable-engage-drd-palette' where model_type = 18

update ACT_DE_MODEL_HISTORY set palette_def_key_ = 'flowable-engage-drd-palette' where model_type = 18

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('54', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 21, '8:3377c214b03598a78b150bcdd0966f4d', 'addColumn tableName=ACT_DE_MODEL; addColumn tableName=ACT_DE_MODEL_HISTORY; sql; sql; sql; sql; sql; sql; sql; sql; sql; sql; sql; sql', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE ACT_DE_MODEL ADD template_ bit CONSTRAINT DF_ACT_DE_MODEL_template_ DEFAULT 0

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('55', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 22, '8:a01dfc0e75872fe88bd891b87fbb4225', 'addColumn tableName=ACT_DE_MODEL', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

CREATE TABLE FLW_DE_APP_REVISION (ID_ varchar(255) NOT NULL, KEY_ varchar(400) NOT NULL, DESCRIPTION_ varchar(4000), CREATED_ datetime, CREATED_BY_ varchar(255), APP_ID_ varchar(255) NOT NULL, EXPORT_BYTES_ varbinary(MAX), CONSTRAINT PK_FLW_DE_APP_REVISION PRIMARY KEY (ID_))

ALTER TABLE FLW_DE_APP_REVISION ADD CONSTRAINT FLW_DE_FK_APP_REVISION_APP_ID FOREIGN KEY (APP_ID_) REFERENCES ACT_DE_MODEL (id) ON DELETE CASCADE

CREATE NONCLUSTERED INDEX FLW_DE_IDX_APP_REVISION_APP_ID ON FLW_DE_APP_REVISION(APP_ID_)

ALTER TABLE FLW_DE_APP_REVISION ADD CONSTRAINT FLW_DE_UQ_APP_REV_APP_ID_KEY UNIQUE (APP_ID_, KEY_)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('56', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 23, '8:3a277baf905f1050432e72c7002a41c0', 'createTable tableName=FLW_DE_APP_REVISION; addForeignKeyConstraint baseTableName=FLW_DE_APP_REVISION, constraintName=FLW_DE_FK_APP_REVISION_APP_ID, referencedTableName=ACT_DE_MODEL; createIndex indexName=FLW_DE_IDX_APP_REVISION_APP_ID, tableName=F...', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('57', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 24, '8:6fba9b735ce48cbb0ca3eb63c7938340', 'dropIndex indexName=FLW_DE_IDX_PRIVILEGE_GROUP, tableName=FLW_DE_PRIVILEGE_MAPPING; createIndex indexName=FLW_DE_IDX_PRIV_GROUP, tableName=FLW_DE_PRIVILEGE_MAPPING', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE FLW_DE_WORKSPACE ADD CREATED_BY_ varchar(255)

ALTER TABLE FLW_DE_WORKSPACE ADD UPDATED_AT_ datetime2(6)

ALTER TABLE FLW_DE_WORKSPACE ADD UPDATED_BY_ varchar(255)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('58', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 25, '8:989ff0c5ea204bee2e58d2a1ac43a212', 'addColumn tableName=FLW_DE_WORKSPACE', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

CREATE TABLE FLW_DE_IDENTITY_INFO (ID_ varchar(64) NOT NULL, REV_ int NOT NULL, TYPE_ nvarchar(255) NOT NULL, NAME_ nvarchar(255) NOT NULL, USER_ID_ nvarchar(64) NOT NULL, DOUBLE_ float(53), LONG_ bigint, TEXT_ nvarchar(4000), TEXT2_ nvarchar(4000), UPDATE_TIME_ datetime2(6), TENANT_ID_ nvarchar(255), CONSTRAINT PK_FLW_DE_IDENTITY_INFO PRIMARY KEY (ID_))

CREATE NONCLUSTERED INDEX FLW_DE_IDX_IDM_INFO_USER_ID ON FLW_DE_IDENTITY_INFO(USER_ID_)

ALTER TABLE FLW_DE_IDENTITY_INFO ADD CONSTRAINT FLW_DE_UQ_ID_INFO_TEN_USR_NAME UNIQUE (TENANT_ID_, USER_ID_, NAME_)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('59', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 26, '8:39f31a48579a4043e42455c4afdc19d5', 'createTable tableName=FLW_DE_IDENTITY_INFO; createIndex indexName=FLW_DE_IDX_IDM_INFO_USER_ID, tableName=FLW_DE_IDENTITY_INFO; addUniqueConstraint constraintName=FLW_DE_UQ_ID_INFO_TEN_USR_NAME, tableName=FLW_DE_IDENTITY_INFO', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE ACT_DE_MODEL ADD model_sub_type nvarchar(64)

ALTER TABLE ACT_DE_MODEL_HISTORY ADD model_sub_type nvarchar(64)

UPDATE ACT_DE_MODEL SET model_sub_type = 'text' WHERE model_type = 15

UPDATE ACT_DE_MODEL SET model_sub_type = 'document' WHERE model_type = 12

UPDATE ACT_DE_MODEL_HISTORY SET model_sub_type = 'text' WHERE model_type = 15

UPDATE ACT_DE_MODEL_HISTORY SET model_sub_type = 'document' WHERE model_type = 12

UPDATE ACT_DE_MODEL SET model_type = 12 WHERE model_type = 15

UPDATE ACT_DE_MODEL_HISTORY SET model_type = 12 WHERE model_type = 15

UPDATE ACT_DE_MODEL_RELATION SET model_type = 12 WHERE model_type = 15

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('60', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 27, '8:1a874667120454fa7a1353221df2a9c8', 'addColumn tableName=ACT_DE_MODEL; addColumn tableName=ACT_DE_MODEL_HISTORY; update tableName=ACT_DE_MODEL; update tableName=ACT_DE_MODEL; update tableName=ACT_DE_MODEL_HISTORY; update tableName=ACT_DE_MODEL_HISTORY; update tableName=ACT_DE_MODEL; ...', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

CREATE TABLE FLW_DE_ACCESS_TOKEN (ID_ varchar(64) NOT NULL, NAME_ varchar(255), DESCRIPTION_ varchar(2000), CREATION_TIME_ datetime NOT NULL, EXPIRATION_TIME_ datetime, USER_ID_ varchar(255) NOT NULL, TENANT_ID_ varchar(255) NOT NULL, TOKEN_VALUE_ varchar(2000), CONSTRAINT PK_FLW_DE_ACCESS_TOKEN PRIMARY KEY (ID_))

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('61', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 28, '8:e0fe85b8b74a17dd32d707e369f18060', 'createTable tableName=FLW_DE_ACCESS_TOKEN', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

ALTER TABLE FLW_DE_WORKSPACE ADD SHARED_WORKSPACE_ID_ varchar(255)

ALTER TABLE FLW_DE_WORKSPACE ADD CONSTRAINT FK_FLW_DE_WORKSPACE_SHARED_ID FOREIGN KEY (SHARED_WORKSPACE_ID_) REFERENCES FLW_DE_WORKSPACE (ID_)

INSERT INTO ACT_DE_DATABASECHANGELOG (ID, AUTHOR, FILENAME, DATEEXECUTED, ORDEREXECUTED, MD5SUM, DESCRIPTION, COMMENTS, EXECTYPE, CONTEXTS, LABELS, LIQUIBASE, DEPLOYMENT_ID) VALUES ('62', 'flowable', 'META-INF/liquibase/flowable-modeler-app-db-changelog.xml', GETDATE(), 29, '8:48acfbf3fc5f264df9794a608c88ed36', 'addColumn tableName=FLW_DE_WORKSPACE; addForeignKeyConstraint baseTableName=FLW_DE_WORKSPACE, constraintName=FK_FLW_DE_WORKSPACE_SHARED_ID, referencedTableName=FLW_DE_WORKSPACE', '', 'EXECUTED', NULL, NULL, '4.11.0', '1377750388')

UPDATE ACT_DE_DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1

